import 'package:flutter/material.dart';

class DDMessagePage extends StatefulWidget {
  final String pageTitle;
  final String pageContent;

  DDMessagePage(this.pageTitle, this.pageContent);

  @override
  State<StatefulWidget> createState() => new DDMessagePageState();
}

class DDMessagePageState extends State<DDMessagePage> {
  @override
  Widget build(BuildContext context) {
    AppBar _appBar;
    if (widget.pageTitle != null && widget.pageTitle != "") {
      _appBar = new AppBar(
        centerTitle: true,
        title: new Text(
          widget.pageTitle,
          style: new TextStyle(color: Colors.white),
        ),
        iconTheme: new IconThemeData(color: Colors.white),
      );
    }

    return new Scaffold(
      appBar: _appBar,
      body: new Center(
        child: new Container(
          padding: EdgeInsets.all(20.0),
          child: new Column(
            children: <Widget>[
              new Text(
                widget.pageContent,
                style: new TextStyle(
                  fontSize: 18.0,
                ),
                textAlign: TextAlign.left,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
